package com.java.gamePackeg.event;

import com.java.gamePackeg.Player;
import com.java.gamePackeg.Product;

import javax.swing.*;
import java.util.List;

//偷电驴
public class FindDonkeyEvevt implements Event {
    private static final float RATE = 0.2f;

    @Override
    public void event(Player player, List<Product> marketProList) {
        JOptionPane.showMessageDialog(null, "警察局门口偷窃小电驴，给电驴主人赔偿现金的20%并拘留七天！");
        player.setMoney(Math.round(player.getMoney() * (1 - RATE)));
    }


}
